This page last changed on Nov 16, 2005 by rossmason.

You can configure an exception strategy on a component that will forward any exceptions thrown during processing to an error queue.

Mule provides a default Component Exception Strategy that will log any exceptions and optionally forward them to an endpoint. This exception strategy creates an ExceptionMessage object that contains the UMOMessage being processed when the error occurred, the exception thrown, a timestamp and any other context information. To configure the exception strategy for a single Mule component in Mule Xml use the following -

<mule-descriptor 
    name="MyComponent"
    implementation="org.foo.MyComponent">
    
    <exception-strategy 
        className="org.mule.impl.DefaultComponentExceptionStrategy">
        <endpoint address="jms://error.queue"/>
    </exception-strategy>
</mule-descriptor>

Alternatively, you can set the same Exception Strategy for all components by setting it on the Model -

<model name="dev">
    <exception-strategy 
        className="org.mule.impl.DefaultComponentExceptionStrategy">
        <endpoint address="jms://error.queue"/>
    </exception-strategy>
    ....
</model>

See Exception Strategies for more information about writing and configuring them.

Document generated by Confluence on Nov 27, 2006 10:27